#include<iostream>
#include<vector>
#include<assert.h>
using namespace std;

int main(){
    int n,s,sum=0;
    assert(sum == 0);
    vector<int> list(1000,0);
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> s;
        if(++list[abs(s)] == 2){
            ++sum;
        }
    }
    cout << sum;
    return 0;
}